using System;


namespace GridControl{
    /// <summary>
    /// Class that represents an ExtJs TreeNode
    /// </summary>

    [Serializable()]
    public class TreeNode
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="T:TreeNode"/> class.
        /// </summary>
        public TreeNode()
        {
            _href = "#";
        }
        private string _text;
        /// <summary>
        /// Text of the node
        /// </summary>
        public string text
        {
            get { return _text; }
            set { _text = value; }
        }

        private bool _draggable;
        /// <summary>
        /// If the node is draggabe
        /// </summary>
        public bool draggable
        {
            get { return _draggable; }
            set { _draggable = value; }
        }
        private string _id;
        /// <summary>
        /// Node id
        /// </summary>
        public string id
        {
            get { return _id; }
            set { _id = value; }
        }
        private bool _leaf;
        /// <summary>
        /// If it has children then leaf=false
        /// </summary>
        public bool leaf
        {
            get { return _leaf; }
            set { _leaf = value; }
        }
        private string _cls;
        /// <summary>
        /// Css class to render a different icon to a node
        /// </summary>
        public string cls
        {
            get { return _cls; }
            set { _cls = value; }
        }
        private bool _isRoot;
        /// <summary>
        /// If this is the root node
        /// </summary>
        public bool IsRoot
        {
            get { return _isRoot; }
            set { _isRoot = value; }
        }
        private string _parentNodeId;
        /// <summary>
        /// Id of the parent node
        /// </summary>
        public string parentNodeId
        {
            get { return _parentNodeId; }
            set { _parentNodeId = value; }
        }
        private string _href;
        /// <summary>
        ///  URL of the link used for the node (defaults to #)
        /// </summary>
        public string href
        {
            get { return _href; }
            set { _href = value; }
        }
        private string _hrefTarget;
        /// <summary>
        /// target frame for the link
        /// </summary>
        public string hrefTarget
        {
            get { return _hrefTarget; }
            set { _hrefTarget = value; }
        }
        private string _icon;
        /// <summary>
        /// The path to an icon for the node. The preferred way to do this is to use
        /// the cls or iconCls attributes and add the icon via a CSS background image.
        /// </summary>
        public string icon
        {
            get { return _icon; }
            set { _icon = value; }
        }
        private bool _isChecked;
        /// <summary>
        /// If a node is checked (only if tree is checkbox tree)
        /// </summary>
        public bool IsChecked
        {
            get { return _isChecked; }
            set { _isChecked = value; }
        }
        
        
    }
}
